package com.lee.study

import akka.actor.ActorDSL._
import akka.actor.{ActorSystem}

/**
 * Created by alex on 15-4-21.
 */
object HelloAkka extends App{

  implicit val system = ActorSystem()

  val echoServer = actor(new Act{
    become {
      case msg => println("echo " + msg)
    }
  })

  echoServer ! "hi!"

  system.shutdown
}

//class EchoServer extends Actor {
//
//  def receive = {
//    case msg: String => println("echo " + msg)
//  }
//}
